package models;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Objects;

@Entity
@Table(name = "t_GeometryDesc")
public class GeometryDesc_T_Entity implements Serializable {
    public static final long serialVersionUID = 1L;

    private int fdRowid;
    private String fdDesc;
    private byte fdAreaType;
    private String fdMapSource;

    @Id
    @Column(name = "fd_Rowid", nullable = false)
    public int getFdRowid() {
        return fdRowid;
    }

    public void setFdRowid(int fdRowid) {
        this.fdRowid = fdRowid;
    }

    @Id
    @Column(name = "fd_Desc", nullable = false, length = 50)
    public String getFdDesc() {
        return fdDesc;
    }

    public void setFdDesc(String fdDesc) {
        this.fdDesc = fdDesc;
    }

    @Id
    @Column(name = "fd_AreaType", nullable = false)
    public byte getFdAreaType() {
        return fdAreaType;
    }

    public void setFdAreaType(byte fdAreaType) {
        this.fdAreaType = fdAreaType;
    }

    @Id
    @Column(name = "fd_MapSource", nullable = false, length = 50)
    public String getFdMapSource() {
        return fdMapSource;
    }

    public void setFdMapSource(String fdMapSource) {
        this.fdMapSource = fdMapSource;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        GeometryDesc_T_Entity that = (GeometryDesc_T_Entity) o;
        return fdRowid == that.fdRowid &&
                fdAreaType == that.fdAreaType &&
                Objects.equals(fdDesc, that.fdDesc) &&
                Objects.equals(fdMapSource, that.fdMapSource);
    }

    @Override
    public int hashCode() {

        return Objects.hash(fdRowid, fdDesc, fdAreaType, fdMapSource);
    }
}
